<ion-header>
  <ion-toolbar>
      <ion-title>学生信息</ion-title>
      <ion-buttons slot="end">
          <ion-button (click)="doClose()">
              <ion-icon slot="icon-only" name="close" color="danger"></ion-icon>
          </ion-button>
      </ion-buttons>
  </ion-toolbar>
</ion-header>

<ion-content>
  <ion-card>
      <ion-item>
          <ion-label> 学号：</ion-label>
          <ion-input [(ngModel)]="studentInfo.userName" name='number' id="number" required #number="ngModel" placeholder="必填">
          </ion-input>
          <div *ngIf="number.invalid && (number.dirty || number.touched)" class="alert-danger">
              <div *ngIf="number.errors.required">
                  必填
              </div>
          </div>
      </ion-item>
      <ion-item>
          <ion-label> 真实姓名：</ion-label>
          <ion-input [(ngModel)]="studentInfo.realName" name='name' id="name" required #name="ngModel" placeholder="必填"></ion-input>
          <div *ngIf="name.invalid && (name.dirty || name.touched)" class="alert-danger">
              <div *ngIf="name.errors.required">
                  必填
              </div>
          </div>
      </ion-item>
      <ion-item>
          <ion-label> 学院/系：</ion-label>
          <ion-input type="text" [(ngModel)]="studentInfo.property02"> </ion-input>
      </ion-item>
      <ion-item>
          <ion-label> 班级：</ion-label>
          <ion-input type="text" [(ngModel)]="studentInfo.property00"> </ion-input>
      </ion-item>
      <ion-item>
          <ion-label>性别：</ion-label>
          <!-- <ion-input type="text" [(ngModel)]="studentInfo.sex"> </ion-input> -->
          <ion-select [(ngModel)]="studentInfo.sex">
            <ion-select-option value="男">男</ion-select-option>
            <ion-select-option value="女">女</ion-select-option>
        </ion-select>
      </ion-item>
      <ion-item>
          <ion-label> 电话：</ion-label>
          <ion-input type="text" [(ngModel)]="studentInfo.mobile"> </ion-input>
      </ion-item>
      <br>
  </ion-card>
  <ion-button class="submit_btn" expand="full" (click)="submitInfo(studentInfo.id)">提交</ion-button>
</ion-content>